<!--大模型选择下拉选择框组件-->

<script setup lang="ts">
import DropSelctBase from "~/components/ai/DropSelctBase.vue";
import LabelBase from "~/components/ai/LabelBase.vue";


const ckpt_nameList = ref<any>([])
const selected = defineModel<string>({default: ''})
onMounted(async () => {
  //获取本地支持的大模型
  await ComfyUI.Initalize()
  // console.log(ComfyUI.ckpt_names)
  ComfyUI.ckpt_names.forEach((item, index) => {
    const ckpt = {
      value: item,
      title: item
    }
    ckpt_nameList.value.push(ckpt)
  })
})

</script>

<template>
  <v-icon size="small" icon="mdi-playlist-check" class="mr-2"></v-icon>
  <label-base>选择大模型</label-base>
  <drop-selct-base v-model="selected" :options="ckpt_nameList"></drop-selct-base>
</template>

<style scoped lang="scss">

</style>